package com.abc.fast.common.constant;

/**
 * 缓存的key常量
 * @Author LiJunXi
 * @Date 2024-03-01 15:49
 */
public class CacheConstants {

    /**
     * 项目名称
     */
    public static final String PROJECT = "xxx:";

    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 登录验证码
     */
    public static final String LOGIN_CODE = "login_code:uuid_%s";

    /**
     * 登录UUID，唯一标识
     */
    public static final String LOGIN_UUID = "login_uuid:";

    /**
     * 登录账户密码错误次数
     */
    public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:username_%s";


    public static String getKey(String key, Object... objects) {
        return PROJECT + String.format(key, objects);
    }




}
